home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- Documentation for Pr.Com
-
-
-
- Purpose:
-
- This program is a utility to print documents on an HP LaserJet
- Printer. The document is divided, by the program, into pages
- based on FF's or line count or a combination of both. It will
- print the pages one or four on a sheet in portrait orientation
- and two on a sheet in landscape. It will also print one-sided,
- two-sided, or in a booklet format. It will handle letter and
- legal size paper. It will expand tabs, such as used by
- assemblers and compilers in producing listings, with blanks.
-
- Will run from command line parameters or interactively. It is a
- generic MSDOS program.
-
- The program has proven useful in printing documents prepared by a
- word processor on both sides of the paper or two or four pages on
- each side in the form of a booklet. Files may be printed with
- the line printer font side-by-side in landscape format (assuming
- the printer has the font) and if desired on both sides of the
- paper.
-
-
- Input File Format:
-
- This program will print plain, vanilla Ascii files. It will also
- work with files containing LJ escape codes. It has been used
- with MS Word list files (generated as Print File output) and
- presumably will work with the list output generated by other word
- processor. Graphics have not been tested, but will probably
- work.
-
- The major rule is that the file must fit into the form specified.
- If one page is printed on a sheet, this simply means that the
- printing must fit in the 8.5" available. If form feeds are used
- to determine page length, there must be no more lines on a page
- than will fit in the 10.6" or 13.6" allowed. For four pages
- printed on a page, the rules are the same with the limits halved.
- For two-up landscape printing, the limits are 5.3" and 6.8" wide
- by 8.5" long. So do not try anything but one-up printing unless
- the file has been written to fit on a smaller page given the font
- being used.
-
- The next rule relates to font selection. When printing single
- sided (1, 2, or 4 up) without the reverse collate option, the
- pages will be printed in order. However, for double sided and
-
-
-
-
-
-
-
-
-
-
-
-
-
- booklet printing, the pages are NOT printed in order. You are
- permitted to select a font which will be selected at the top of
- EVERY page (the default is Courier in the proper orientation).
- Any printing which is to be done with a different font, must
- select the font on the page in which it occurs. A font selection
- on one page will not carry over to another.
-
- In order to implement, two and four pages on a sheet, the program
- uses margins. When use print with either of those options, you
- may not set or reset any of the margins. For four-up printing,
- for the pages printed on the lower half the page, it uses a
- vertical motion to locate the first line. It is not permitted
- for the page being printed to use absolute vertical (row)
- addressing, however, relative addressing is permitted. It is
- permitted to push the cursor (LJ+) at the start of a page and pop
- it later in the page to return to the logical top of page. It
- would be bad form if the pushed position were not pop'ed
- somewhere before the end of the page.
-
- In order to handle the random page printing required by some
- options, the entire file will be read into memory before
- printing. This imposes a limit on file length. The program uses
- about 53K bytes in addition to that used by MSDos for code and
- data. The entire rest of memory is available and is allocated in
- chunks of 16384 bytes each. The input file must fit in the
- memory so allocated. Fairly large files are possible, but there
- is a limit depending on your memory size.
-
-
- Output Formats:
-
- There are twelve formats produced by the program. As they are
- combinations of three parameters, the description will be ordered
- by parameter.
-
- Single sided format is the simplest from one perspective. The
- file is printed in a single pass on one side of the paper. The
- user may request 1, 2, or 4 pages on each physical page. The
- option for 2 will be in landscape orientation, the others in
- portrait.
-
- Double sided format will print on both sides of the paper. The
- same options of 1, 2, or 4 pages per side of a sheet are
- available. The left page(s) on a side is the lower page
- number(s) than the right page(s). Similarly, the upper pages are
- lower page numbers than the lower pages. By default, if you
- staple (or use a hole punch) on the long left side of the sheet
- for portrait printing or the short left side for landscape, the
- pages are order so that you may use it as a book turning the
- pages. If the Z-fold option is used, you would staple or punch
-
-
-
-
-
-
-
-
-
-
-
-
-
- the paper on the top and turn the pages as with Z-folded paper.
- This might be used with 2-up program listing when put in a three-
- ring binder, the pages will be ordered properly.
-
- The booklet format is the most complex to explain. If only one
- page is printed on a side, it is identical with the double-sided
- format. When two pages are printed side by side in landscape
- format, the result may be stapled in the middle (the margin
- between the two pages) and folded as a booklet. It could also
- have been cut, folded over, and punched to fit in a binder. When
- 4 pages are printed on a side, the result should be cut between
- the upper pages and lower pages (as seen when the paper is in
- portrait orientation). Then the lower pages should be placed on
- top of the upper pages and stapled between left and right pages.
- This may then be folded into a booklet. It is probably easier to
- understand this after trying it. It would be well if on your
- first trial of a four-up booklet the pages were either numbered
- or you could easily tell their order. This would help a bit in
- verifying that you understand the instructions.
-
-
- Output Collation
-
- The program was written to work with a forward collator by
- default. If your printer does not have a forward collator, you
- may specify the reverse collator options. For single sided
- printing, the pages will be printed in reverse or and the
- resulting stack will be in the normally desired order. For the
- other two formats, the order of printing will be chosen so that
- the output of the second pass will be in the normally desired
- order.
-
-
- Soft Fonts:
-
- Soft fonts present no problems. However, one must NOT put the
- soft fonts in the file to be printed. There is no guarantee when
- any part of the file will be copied to the printer. Page
- allocation will not work properly. The proper action is to down
- load the fonts before hand using some other utility.
-
-
- Printer Selection:
-
- By default, the name PRN is used to access the printer. If your
- system uses a different name for the LJ, you may use the
- Command.Com command SET to set the parameter LJ to the name to
- use. For example: SET LJ=COM2 will cause the program to use COM2
- for the printer. As a side effect, you may name a disc file in
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- the SET command. If the file exists, it will be overwritten and
- if it does not, it will be created.
-
-
- Command Line Invocation:
-
- PR <filename> <type><args>
-
- <type> = S#-singlesided, D#-doublesided, B#-booklet
- # = 1, 2 or 4 pages/page
-
- <args> = L long paper(14"),
- T expand tabs
- C=# number of copies
- P=# maximum lines per page
- Z Z-fold
- - Reverse Collator
-
- U for USASCII or R8 for Roman-8
- F=font type
- C Courier
- L Lineprinter
- T10 TimesRoman 10
- T12 TimesRoman 12
- T8 TimesRoman 8
- H Helvetica 14.4
- or F/<codes>
-
- If only the file name is specified, ie., no type or arguments,
- the type and arguments will be requested interactively as
- described later. If the type or any argument is specified, the
- defaults will be used for the rest. The default type is single
- sided with one logical page per sheet.
-
- The parameters may be separated by spaces or commas or semicolons
- (between the program name and the file name, you must use a
- space). All spaces, commas and semicolons will be ignored. The
- argument <type> must precede all other arguments and specifies
- the format as described earlier. The 'T' option will cause all
- tabs encounter to be expand as blanks. It will assume a tab stop
- at column 9, 17, and every 8 columns thereafter. The 'C' option,
- for example C=5, specifies the number of copies to make. It uses
- the LJ copies argument and does not make multiple passes. The
- 'P' option should be used ONLY if the pages are not defined by
- FF's in the file. When the indicated number of lines has
- occurred since the previous page break (whether caused by line
- count or FF), a page break is made. Z-fold was discussed under
- double sided output format above. The reverse collator '-'
- option was also discussed earlier. If an option is not
- specified, the defaults will be used for that option: 11" paper,
-
-
-
-
-
-
-
-
-
-
-
-
-
- no tab expansion, one copy, use FF's to define pages, not Z-
- folded, and forward collator.
-
- As was mentioned earlier, when each logical page is printed, the
- default font is selected. If none is specified, the Courier font
- of the proper orientation is selected with the Roman-8 character
- set. The U option may be used to select the USASCII character
- set. The font may be specified with a F= option specifying the
- type face and for TmsRmn, the point size. Another option allows
- the specification of the escape sequence to use. This option is
- specified as F/ followed by the sequence which is terminated by
- the end of the parameter list or another /. If another slash
- occurs, other arguments may follow. Since, esc characters cannot
- be easily entered in commands, the following procedure is used.
- Since all of the LJ escape sequences which may be used have an &
- or ( or ) or * as the second character and these characters do
- not occur within a valid escape sequence (binary types of escape
- sequences such as graphics or font definitions are not permitted
- in this context), whenever one of these four characters occur, an
- escape character is inserted before it.
-
- Interactive Arguments Specification:
-
- If the file name was not specified on the command line, it will
- be requested interactively. A full path name or a name relative
- to the current directory is permitted. If the file is not found,
- an error will be reported and you may re-enter the name.
- Entering a null line for the file name will terminate the
- program. This allows you to exit when you, for any reason,
- cannot enter the name of the file you want or change your mind.
-
- You will be asked for the value of each of the other parameters.
- The request will indicate, in parentheses, the default value.
- Pressing return will select the default value. Most parameters
- require only a single key stroke. If the question is a yes or no
- questions, type only Y or N. Do not enter the carriage return
- also. The use of upper or lower case is insignificant. Note
- that the Z-fold question is asked only if it is significant, ie.,
- double sided. The questions asking the number of copies and the
- numbers of line on a page, if not defaulted, require a number to
- be entered and do require a carriage return to terminate.
-
- The default font question also may accept multiple characters and
- requires a carriage return. The default, Courier, is selected by
- entering only a return. The other fonts are selected by entering
- only their first letter. For TimesRoman, you will be asked for
- the font size in points. This response must have a carriage
- return also. If you elect to enter an escape sequence, it must
- begin with a slash and may be a full line long. A terminating
- slash is optional. By default, 6 lines per inch are selected on
-
-
-
-
-
-
-
-
-
-
-
-
-
- each page, unless the line printer font is selected, in which
- case it will be 8 lines per inch. You may override this is the
- escape sequence, but this will require you to use the escape
- sequence to select the font as well.
-
-
- Operation:
-
- Once the file name and arguments have been accepted, the program
- reads the file. While reading the file, it will display on the
- screen, the number of bytes read every time 16384 more bytes have
- been read. It will then allocate pages. You will see the page
- numbers being allocated displayed on the screen. Next comes the
- first pass of printing. It will print the back side of each
- sheet first (for single sided, it is the front side). While
- doing this the page numbers being printed will be displayed. For
- one-up printing, a single number is shown, for two-up the two
- pages side by side are shown, and for four-up, the four page
- numbers are shown as they are printed. For single and double
- sided printing, the same line is reused to display the page
- number for the next sheet. This is kind of a progress indicator.
- For booklet format, when more than one logical page is printed on
- a side, a new line is used for each sheet. This is because the
- page numbers are in a strange looking order and one could not
- judge the progress through the file if all of the numbers
- overwrote one another.
-
- For twosided or booklet printing, when the first pass is
- complete, you will be instructed to replace the paper in the
- printer. (Note: the printer will probably have a few sheets left
- to print after the instructions are displayed, wait until the
- form feed light is out) Be careful to replace it as instructed.
- The top of the page is the top as one would see it when reading
- the printing. You must always put the paper in the input tray
- with the printed side up. The printer prints on the side facing
- down in the supply tray. Do NOT rearrange the pages, they are in
- the correct order. The only exception is if you specified the
- reverse collator option backwards, you must arrange the sheets in
- the reverse order before replacing them. Pressing return on the
- keyboard will start the printing again.
-
- When the printing is done, you will be asked whether to reprint
- any pages. It is hoped that this will never be needed, however,
- it has been needed a few times. The major problem in printing on
- both sides is when a double feed occurs. If two sheets are feed
- as if they were one, the order of the sheets is disarranged
- thereafter. Rather than repeating the entire job, you may
- reprint the last portion of the job. The question is answered
- with a Y or N or return(means No). Do not enter a return after
- the Y or N. If Yes, you will be asked how many initial pages to
-
-
-
-
-
-
-
-
-
-
-
-
-
- skip. This is the number of physical sheets of paper which do
- NOT require reprinting. The printing will be repeated from that
- spot. If zero is entered, the entire document is reprinted.
- This is one way to obtain multiple copies which do not require
- further collation. In my experience, the double feed occurs most
- often if the paper has not been properly aligned in the input
- tray after it is replaced. Careful alignment of the sheets being
- replaced with each other and with any blank paper in the tray
- already reduces the chances of this problem.
-
- NOTE: In some cases, one more sheet will be printed for each
- copy in pass 2 than was printed in pass 1. In double sided
- printed with one logical page on a side, if there are an odd
- number of pages, this will occur. It will also occur in other
- situations of a similar nature. It will not occur when the
- reverse collator option is set. The program assumes that there
- will be blank paper available on pass two for the extra sheet.
- If there is not, the printer will stop with error code 11 and you
- must merely add paper and continue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-